body {
    margin: 0;
    padding: 10px;
    font-family: 'Microsoft YaHei', sans-serif;
    background-color: #f0f0f0;
    overflow-x: hidden;
    touch-action: none;
}

@media (max-width: 768px) {
    body {
        padding: 5px;
    }
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .toolbar {
        gap: 8px;
        padding: 10px;
        margin-bottom: 10px;
    }
}

.tool-group {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .tool-group {
        gap: 5px;
        padding: 8px;
        min-width: 0;
    }
}

.tool-group label {
    font-weight: bold;
    color: #333;
}

.color-picker {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.brush-size {
    width: 100px;
}

.tool-button {
    padding: 8px 16px;
    font-size: 14px;
    border: 2px solid #007bff;
    background-color: white;
    color: #007bff;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 768px) {
    .tool-button {
        padding: 10px 12px;
        font-size: 12px;
        min-width: 60px;
        min-height: 40px;
    }
}

.tool-button.active {
    background-color: #007bff;
    color: white;
}

.tool-button:hover {
    background-color: #0056b3;
    color: white;
    border-color: #0056b3;
}

.tool-button:disabled {
    background-color: #e9ecef;
    color: #6c757d;
    border-color: #dee2e6;
    cursor: not-allowed;
}

.tool-button:disabled:hover {
    background-color: #e9ecef;
    color: #6c757d;
    border-color: #dee2e6;
}

.canvas-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
}

@media (max-width: 768px) {
    .canvas-container {
        width: 100%;
        max-width: 100vw;
    }
}

.info-panel {
    margin-top: 20px;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .info-panel {
        margin-top: 10px;
        padding: 10px;
        font-size: 12px;
    }
    
    .info-panel h3 {
        font-size: 16px;
    }
    
    .info-panel li {
        margin: 3px 0;
    }
}

.info-panel h3 {
    margin-top: 0;
    color: #333;
}

.info-panel ul {
    margin: 10px 0;
    padding-left: 20px;
}

.info-panel li {
    margin: 5px 0;
    color: #666;
}

/* 文字输入框样式 */
.text-input-overlay {
    position: absolute;
    background: white;
    border: 2px solid #999;
    border-radius: 3px;
    padding: 2px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.text-input-overlay input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 16px;
    font-family: 'Microsoft YaHei';
    background: transparent;
    padding: 0;
    margin: 0;
    line-height: 1.2;
} 